
#include "SpaceShooter.h"

void SpaceShooter::render(){

	std::list<Object*>::iterator it;
	std::list<Animation>::iterator aIt;
	std::list<Texto*>::iterator tIt;

	switch(gameState)
	{
		case INGAME:
			spaceBg.render(dispSurface);

			//Objects
			ship.render(dispSurface);
			for(it = objectList.begin(); it != objectList.end(); it++)
				(*it)->render(dispSurface);

			//Animations
			for(aIt = animationList.begin(); aIt != animationList.end(); aIt++)
				aIt->render(dispSurface);

			//Texts
			for(tIt = textList.begin(); tIt != textList.end(); tIt++)
				(*tIt)->onRender(dispSurface);

		break;

		default:
			return;
	}

	SDL_Flip(dispSurface);
}

